<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>


<div id="red">红盒子</div>
<script>
var red = document.getElementById("red");
red.className = "red";
red.className +=  " blue";
</script>






</body>
</html>
